﻿<UserControl x:Class="UWCSE.CompleterVSPackage.EnterQueryControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="280" d:DesignWidth="500">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Margin="3" HorizontalAlignment="Stretch" TextWrapping="Wrap" Name="descriptionTextBlock" VerticalAlignment="Stretch">Enter a query below.<LineBreak/>
<LineBreak/>
Tips:<LineBreak/>
  • &quot;xx&quot; searches for anything.<LineBreak/>
  • Just a type name constructs a value of that type.<LineBreak/>
  • Starting the query with a cast forces the result to be that type: &quot;List&quot; and &quot;(List)xx&quot; are equivalent queries.<LineBreak/>
  • &quot;m(foo, bar)&quot; searches for a method which takes the values foo and bar (along with zero or more other arguments).<LineBreak/>
  • &quot;foo.ff&quot; searches for fields/properties of foo (or their fields/properties or just foo itself).<LineBreak/>
  • &quot;foo.xx&quot; is like &quot;foo.ff&quot; except &quot;getter&quot; methods like string's .ToCharArray() will be included in the results.<LineBreak/>
  • Queries can be combined: for example &quot;foo.ff = m(bar, baz.xx)&quot; finds assignments to some field of foo from some method taking bar and some field/getters of baz.</TextBlock>
        <TextBox Grid.Row="1" HorizontalAlignment="Stretch" Name="queryTextBox" VerticalAlignment="Stretch" KeyDown="queryTextBox_KeyDown" />
        <StackPanel Grid.Row="2" HorizontalAlignment="Right" Name="buttonsStackPanel" VerticalAlignment="Stretch" Orientation="Horizontal">
            <Button Content="Execute Query" Name="executeButton" Margin="3" Click="executeButton_Click" />
            <Button Content="Cancel" Name="cancelButton" Margin="3" Click="cancelButton_Click" />
        </StackPanel>
    </Grid>
</UserControl>
